package com.lse_from.dto;

import com.baomidou.mybatisplus.annotation.TableId
import com.fasterxml.jackson.annotation.JsonFormat
import com.fasterxml.jackson.databind.annotation.JsonSerialize
import com.fasterxml.jackson.datatype.jsr310.ser.LocalDateTimeSerializer
import com.lse_from.utils.PubVal
import java.time.LocalDateTime;
import java.io.Serializable;
import java.util.*
import javax.validation.constraints.NotBlank

/**
 * <p>
 * 已创建的表单列表
 * </p>
 *
 * @author 祁雪
 * @since 2022-01-19
 */
class Froms : Serializable {

    /**
     * 主键
     */
    @TableId
    var id: String? = null

    /**
     * 表单名称
     */
    @field:NotBlank(message = "请输入表单名称")
    var fromName: String? = null

    /**
     * 数据库对照表名
     */
    var tableName: String? = null

    /**
     * 创建时间
     */
    @JsonSerialize(using = LocalDateTimeSerializer::class)
    @JsonFormat(pattern = PubVal.DATE_TIME_PATTERN)
    var createTime: LocalDateTime? = null


    override fun toString(): String {
        return "Froms{" +
                "id=" + id +
                ", tableName=" + tableName +
                ", fromName=" + fromName +
                ", createTime=" + createTime +
                "}"
    }
}
